package Day10练习;
//0-随机数之间的和
import java.util.Random;

public class KaoShi01 {
    public static void main(String[] args) {
        Random ran = new Random();
        int i = ran.nextInt(100)+1;
        System.out.println("随机数是:" + i);
        XXX(i);
        System.out.println(XXX(i));
    }

    public static int XXX (int a){
        int sum = 0;
        for (int i = 0; i <= a; i++) {
            sum += i;
        }
        return sum;
    }
}
